package com.mzz.structure.composite;

/**
 * 叶子节点
 * @author xushijian
 * @date 18/6/8 上午9:15
 */
public class Leaf extends Component {

    public Leaf(String name) {
        super(name);
    }

    @Override
    void add(Component component) {

    }

    @Override
    void remove(Component component) {

    }

    @Override
    void foreach() {

        System.out.println("Leaf: \t\t " + this.name);

    }
}
